class LoginController < ApplicationController
   def index
      #render :action => 'login'
      redirect_to(:action => "login")
   end
   
   def login
      
   end
   
   def efetua_login
      email = params[:email]
      senha = params[:senha]
      if !email.nil? || !senha.nil? || email != senha
         if email == "userteste" && senha == "arooma"
            session[":user_id"] = email
            redirect_to :controller => "usuario", :action => "index"
         end
      end      
      flash[:erro] = 'Usuário ou senha incorretos'      
      redirect_to :action => "login"
      #if email.nil? || senha.nil? || email == senha
      #   redirect_to :action => "login"
      #   flash[:notice] = 'Usuário ou senha incorretos'
      #else
      #   if
      #   session["user_id"] = username
      #   redirect_to :controller => "usuario", :action => "index"
   end   
end
